#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
void f(char arr[])
{
	char tmp = *arr;
	int a = strlen(arr);
	*arr = *(arr + a - 1);
	*(arr + strlen(arr) - 1) = '\0';
	if (strlen(arr+1) >=2)
		f(arr + 1);
	*(arr + a - 1) = tmp;
}
int main()
{
	char arr[] = "asdfg";
	f(arr);
	return 0;
}